<template>
    <div id="content">
        <Header v-if="!$route.fullPath.includes('SandSculptureMain') && isPc"/>
        <div :style="$route.fullPath == '/home' ? 'background-color: #f6f6f6;' : ''">
            <RouterView/>
        </div>
        
        
        <div class="footer" v-if="!$route.fullPath.includes('SandSculpture')">
            <Footer />
        </div>
        
        <div v-if="isShowLoginStore.isShowLogin">
            <Login :isShowLogin_fn="isShowLogin_fn"/>
        </div>
    </div>
    
</template>

<script setup>
    import Header from "@/components/Header/index.vue"  //头部
    import Footer from "@/components/Footer/index.vue"  //底部
    import Login from "@/components/Login/index.vue"
    import {useIsShowLogin} from "@/store/modules/isShowLogin/index.js"
    import { useRoute } from "vue-router"
    const route = useRoute();
    
    const isShowLoginStore = useIsShowLogin();
    const isShowLogin_fn = ()=>{
        isShowLoginStore.unShowLogin()
    }

    const [navigationTiming] = performance.getEntriesByType("navigation");
    // console.log("页面加载耗时:", navigationTiming.loadEventEnd - navigationTiming.startTime+'毫秒');

    const isPc = ref(false);
    if (window.innerWidth > 1024) {
        isPc.value = true;
    }
</script>

<style lang="less" scoped>
.body{
    background-color: #f6f6f6;
}
</style>